<?php

class Admin_Form_CourseForm extends Zend_Form
{

    public function init()
    {
       $this->setAttrib('class', 'validate-form');
       $this->setMethod('post');
       
       $this->addElement('text','txtMonHoc',array(
       										'label'	=> "Tên môn học",
       										'required'	=> true,
       										'class'		=> 'required'
       		));
    }


 	/**
     * 
     * Set action cho form
     * @param unknown_type $actionName: ten cua action
     */
    function addAction($actionName){
    	$this->setAction(Zend_Controller_Front::getInstance()->getBaseUrl()."/admin/course/".$actionName);
    }
    
    function addAction_Url($module="front", $controller, $actionName){
    	$this->setAction(Zend_Controller_Front::getInstance()->getBaseUrl()."/".$module."/".$controller."/".$actionName);
    }
    /**
     * 
     * Add nut submit 
     */
    function addSubmitButton($name, $label){
    	$this->addElement('submit',$name,array(
    						'label'		=>	$label,
    						'decorators'=>	array('ViewHelper',array('HtmlTag',array(
    																			'tag' => 'dd' //giu nguyen the dd ko them bat cu the j
    																		)
    														
    															)
    							
    										),
    						'class'		=>	'input-hover uSubmit'	
    					));
    	
    }
    
    function addHiddenId($name,$value){
    	$this->addElement('hidden',$name,array(
			    				'value'	=> $value	
    						));
    }
}

